package both.map.mapModel;
import org.w3c.dom.*;
import java.awt.Dimension;

/**
 * The interface for all map models. At the moment is primarily
 * interested in storing a representation of the map and communicating
 * that representation to other MapModels.
 *
 * @author jdl
 * 
 */
public interface MapCommunicator {

	/**
	 * Generate XML representing the complete map. 
	 * @return an XML document containing the entire map
	 */
	Document generateCompleteMapXML();
	
	/**
	 * create a map object, in all elements which need updating are 
	 * included: all other elements are null.
	 * @return the update map
	 */
	ModelMap generateUpdateMap();
	
	/**
	 * update the entire map
	 * @param newMap an XML document containing the map update 
	 */
	void updateMap(Document newMap);
	
	/**
	 * @return the entire map
	 */
	ModelMap getMap();
	
	/**
	 * @return the size of the chunks used by this map, in cells
	 */
	Dimension getChunkSize();
	
}
